package com.jwsoft.manager.core.gateway.controller;

import com.jwsoft.manager.common.vo.eduSyncDyApply.EduSyncDyCommonVO;
import com.jwsoft.manager.core.integration.EduSyncDyDeleteIntegration;
import com.jwsoft.manager.common.vo.eduSyncDyDelete.EduSyncDyDeleteVO;
import com.jwsoft.manager.common.vo.eduSyncDyDelete.EduSyncDyDeleteKeyVO;
import com.jwsoft.manager.common.vo.eduSyncDyDelete.EduSyncDyDeleteQueryVO;
import com.github.pagehelper.PageInfo;
import com.bifang.engine.assistant.core.domain.AppResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;
import com.bifang.engine.protect.core.annotation.Idempotent;
import org.springframework.validation.annotation.Validated;
import com.bifang.assistant.common.constants.Validators;

/**
 * 东阳市报名专库同步情况表网关
 *
 * @author wangt
 * @since 2024-06-11
 */
@RestController
@RequestMapping(value = "/doc/api")
@Tag(name = "东阳市报名专库同步情况表", description = "东阳市报名专库同步情况表")
public class EduSyncDyDeleteController {

    @Autowired
    public EduSyncDyDeleteIntegration eduSyncDyDeleteIntegration;

    @Operation(summary = "东阳市报名专库同步情况表分页查询",description = "东阳市报名专库同步情况表分页查询")
    @PostMapping(value = "/eduSyncDyDelete0001", produces = "application/json;charset=UTF-8")
    public AppResponse<PageInfo<EduSyncDyDeleteVO>> getList(@RequestBody @Validated EduSyncDyDeleteQueryVO vo) {
        return AppResponse.successData(eduSyncDyDeleteIntegration.getList(vo));
    }

    @Operation(summary = "东阳市报名专库同步情况表根据主键查询详情",description = "东阳市报名专库同步情况表根据主键查询详情")
    @PostMapping(value = "/eduSyncDyDelete0002", produces = "application/json;charset=UTF-8")
    public AppResponse<EduSyncDyDeleteVO> getById(@RequestBody @Validated EduSyncDyDeleteKeyVO vo) {
        return AppResponse.successData(eduSyncDyDeleteIntegration.getById(vo));
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "东阳市报名专库同步情况表新增",description = "东阳市报名专库同步情况表新增")
    @PostMapping(value = "/eduSyncDyDelete0004", produces = "application/json;charset=UTF-8")
    public AppResponse<EduSyncDyDeleteVO> add(@RequestBody @Validated(value = {Validators.Add.class}) EduSyncDyDeleteVO vo) {
        return AppResponse.successData(eduSyncDyDeleteIntegration.add(vo));
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "东阳市报名专库同步情况表修改",description = "东阳市报名专库同步情况表修改")
    @PostMapping(value = "/eduSyncDyDelete0005", produces = "application/json;charset=UTF-8")
    public AppResponse<EduSyncDyDeleteVO> edit(@RequestBody @Validated(value = {Validators.Edit.class}) EduSyncDyDeleteVO vo) {
        return AppResponse.successData(eduSyncDyDeleteIntegration.edit(vo));
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "东阳市报名专库同步情况表删除",description = "东阳市报名专库同步情况表删除")
    @PostMapping(value = "/eduSyncDyDelete0006", produces = "application/json;charset=UTF-8")
    public AppResponse del(@RequestBody @Validated EduSyncDyDeleteKeyVO vo) {
        eduSyncDyDeleteIntegration.del(vo);
        return AppResponse.successMsg("删除成功！");
    }

    @Operation(summary = "东阳市申请，审核，通过情况表分页查询",description = "东阳市申请，审核，通过情况表分页查询")
    @PostMapping(value = "/eduSyncDyDelete0007", produces = "application/json;charset=UTF-8")
    public AppResponse<PageInfo<EduSyncDyCommonVO>> getEduSync(@RequestBody @Validated EduSyncDyDeleteQueryVO vo) {
        return AppResponse.successData(eduSyncDyDeleteIntegration.getEduSync(vo));
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "东阳市报名专库申请，审核，录取同步情况表删除",description = "东阳市报名专库申请，审核，录取同步情况表删除")
    @PostMapping(value = "/eduSyncDyDelete0008", produces = "application/json;charset=UTF-8")
    public AppResponse delSyncAll(@RequestBody @Validated EduSyncDyDeleteKeyVO vo) {
        eduSyncDyDeleteIntegration.delSyncAll(vo);
        return AppResponse.successMsg("删除成功！");
    }





}
